package com.example.springbootdemo2.controller;

import com.example.springbootdemo2.pojo.db1.User;
import com.example.springbootdemo2.pojo.db2.Role;
import com.example.springbootdemo2.service.RoleService;
import com.example.springbootdemo2.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.net.PortUnreachableException;
import java.util.List;

@RestController
@RequestMapping("/all1")
public class RoleController {

    @Autowired
    private RoleService roleService;

    @GetMapping("/geteroleuser")
    public List<Role> getUserList(){
        return roleService.getAllUser();
    }
}
